#!/bin/bash

#https://segmentfault.com/a/1190000000264347
#http://rmingwang.com/vagrant-commands-and-config.html
#http://ninghao.net/blog/2077

set -ex
export DEBIAN_FRONTEND=noninteractive

cd ~
pwd

sudo cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

sudo apt-get -y clean
sudo apt-get -y upgrade
sudo apt-get update
sudo apt-get update --fix-missing
sudo apt-get -y install aptitude
sudo apt-get -y clean

sudo aptitude install -y default-jdk git wget p7zip vim htop zsh # tomcat7

sudo wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
cat /etc/shells
echo $SHELL
sudo chsh -s /bin/zsh
echo $SHELL
cp .zshrc .zshrc.bak

git clone https://github.com/amix/vimrc.git ~/.vim_runtime
sh -ex ~/.vim_runtime/install_awesome_vimrc.sh

#sudo aptitude install -y make gcc dkms
#sudo aptitude install -y linux-headers-`uname -r` build-essential
#sudo /etc/init.d/vboxadd setup
#sudo aptitude install -y virtualbox-guest-utils
sudo aptitude autoclean -y


#vagrant package -hUsage: vagrant package [options] [name]Options:
#        --base NAME                  virtualbox程序里面的虚拟机的名称，不是box的名字也不是Vagrantfile里面的虚拟机名称.默认是打包当前目录下面的虚拟机。
#        --output NAME                要打包成的box名称，不会自动添加.box后缀，要手动加.默认值package.box        --include FILE...            打包时包含的文件名，你可以把.box文件理解为一个压缩包
#        --vagrantfile FILE           打包时包含的Vagrantfile文件，原理和上面类似
#    -h, --help                       Print this help

#dpkg -l | grep tomcat
#pgrep mongo -l

#/var/lib/tomcat7
#JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8  -Duser.timezone=GMT+08"



#/usr/bin
#/bin
